package ui.dnd;

import javax.swing.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

/**
 * Created with IntelliJ IDEA.
 * User: Deshun
 * Date: 2/18/13
 * Time: 1:32 PM
 * To change this template use File | Settings | File Templates.
 */
public class DraggableMouseListener extends MouseAdapter {

        public void mousePressed(MouseEvent e) {
            JComponent c = (JComponent) e.getSource();
            TransferHandler handler = c.getTransferHandler();
            handler.exportAsDrag(c, e, TransferHandler.COPY);
        }

}
